/*
 * This overlay class draws the Start Marker.
 */

package com.overlays;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.widget.Toast;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.OverlayItem;

public class StartMarker extends ItemizedOverlay<OverlayItem> {

    private List<OverlayItem> mItemList = new ArrayList<OverlayItem>();
    private Context context;
    private String toastText = "";

    public StartMarker(Drawable defaultMarker, GeoPoint p, Context _context) {
	super(defaultMarker);
	context = _context;
	mItemList.add(new OverlayItem(p, "Title", "Snippet"));
	populate();
    }

    @Override
    protected OverlayItem createItem(int i) {
	return mItemList.get(i);
    }

    @Override
    protected boolean onTap(int i) {
	Toast.makeText(context, "Start Point", Toast.LENGTH_SHORT).show();
	return true;
    }

    @Override
    public int size() {
	return mItemList.size();
    }

    /* (non-Javadoc)
     * @see com.google.android.maps.ItemizedOverlay#draw(android.graphics.Canvas, com.google.android.maps.MapView, boolean)
     */

}
